Crate cuid

source ·
Expand description

cuid-rust

CUID generation in rust

NOTE: The first version of the CUID specification is deprecated. Please use the cuid2() function from this crate instead, which is a re-export from the cuid2 crate. Please upgrade to that crate for more CUID construction options.

use cuid;

// Get a CUID
println!("{}", cuid::cuid2());

Note that this crate also provides a very simple, single purpose commandline interface:

$> cuid
ckfritrvg0000kdtwc766fful

You can generate v2 CUIDs via the commandline like so:

$> cuid --v2

See the original implementation for more details on CUIDs in general.

Enums

Functions

  • cuidDeprecated
    Generate a CUID
  • Creates a new CUID.
  • is_cuidDeprecated
    Return whether a string is a legitimate CUID
  • is_slugDeprecated
    Return whether a string is a legitimate CUID slug
  • slugDeprecated
    Generate a CUID slug